package org.flow.basic.doubts.tjbase;

import java.util.List;

/**
 * @author xl-9527
 * @since 2024/8/21
 */
public class StreamDemo {

	public void testFilterStream() {
		List<StringBuffer> list = List.of(new StringBuffer("a"), new StringBuffer("b"));
		List<StringBuffer> filterList = list.stream().filter(v -> "a".equalsIgnoreCase(v.toString())).toList();

		for(StringBuffer v: filterList) {
			v.append("b");
		}

		filterList.forEach(System.out::println);
	}
}
